<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>补丁管理 - ROAS资源管理系统</title>
<style type="text/css">
<!--
.STYLE1 {
	color: #FFFFFF;
	font-weight: bold;
	font-size: 12px;
}

.STYLE6 {
	font-size: 12px;
}

.STYLE7 {
	font-size: 12px;
	background-color: #f5f5f5;
	margin: 0;
}

body {
	margin: 0;
}

.STYLE8 {
	color: #FF0000
}
-->
</style>
</head>

<body margin=0>

	<table width="100%" bgcolor="#FFFFFF" border="0" cellpadding="0"
		cellspacing="0">
		<tr>
			<td height="28" class="STYLE7">系统管理 &gt;账号创建</td>
		</tr>
		<tr>
			<td valign="top"><table width="50%" align="center">
					<tr>
						<td height="25" colspan="2" bordercolor="#000000"
							bgcolor="#1C94C4"><div align="center" class="STYLE1">账号创建</div></td>
					</tr>
					<tr>
						<td height="25" bgcolor="#f5f5f5"><div align="right"
								class="STYLE6">
								<div align="left">&nbsp;用户名：</div>
							</div></td>
						<td height="25" bgcolor="#f5f5f5"><span class="STYLE6">
								<input type="text" name="username" /> <span class="STYLE8">*</span>
								</label>
						</span></td>
					</tr>
					<tr>
						<td height="25" bgcolor="#f5f5f5"><div align="right"
								class="STYLE6">
								<div align="left">&nbsp;密码：</div>
							</div></td>
						<td height="25" bgcolor="#f5f5f5"><input name="password"
							type="password" /><span class="STYLE8">*</span></td>
					</tr>
					<tr>
						<td height="25" bgcolor="#f5f5f5"><div align="right"
								class="STYLE6">
								<div align="left">&nbsp;性别：</div>
							</div></td>
						<td height="25" bgcolor="#f5f5f5"><span class="STYLE6">
								<select name="sex">
									<option>男</option>
									<option>女</option>
							</select> </label>
						</span></td>
					</tr>
					<tr>
						<td height="25" bgcolor="#f5f5f5"><div align="right"
								class="STYLE6">
								<div align="left">&nbsp;用户角色：</div>
							</div></td>
						<td height="25" bgcolor="#f5f5f5"><select name="role">
								<option>管理员</option>
								<option>结算员</option>
								<option>报单员</option>
						</select></td>
					</tr>

					<tr>
						<td height="25" bgcolor="#f5f5f5"><div align="right"
								class="STYLE6">
								<div align="left">&nbsp;使用人姓名：</div>
							</div></td>
						<td height="25" bgcolor="#f5f5f5"><input name="realname"
							type="text" /></td>
					</tr>
					<tr>
						<td height="25" bgcolor="#f5f5f5"><div align="right"
								class="STYLE6">
								<div align="left">&nbsp;联系手机号：</div>
							</div></td>
						<td height="25" bgcolor="#f5f5f5"><input name="telphone"
							type="text" /></td>
					</tr>
					<tr>
						<td height="25" colspan="2" bgcolor="#1C94C4"><div
								align="center" class="STYLE6">
								<form action="" method="post" name="form1" id="form1">
									<label> <input type="button" name="Submit" value="添加"
										onclick="winalert()" />
									</label>
								</form>
							</div></td>
					</tr>
				</table></td>
		</tr>
	</table>
	<script type="text/javascript" src="../js/jquery-1.11.1.min.js"></script>
	<script language="javascript">
		function winalert() {
			var username = $("input[name=username]").val();
			var password = $("input[name=password]").val();
			if(username == null || username == ""){
				alert("请输入用户名");
				return;
			}
			if(password == null || password == ""){
				alert("请输入密码");
				return;
			}
			$.post("../user/add", {
				username : $("input[name=username]").val(),
				password : $("input[name=password]").val(),
				sex : $("select[name=sex]").val(),
				role : $("select[name=role]").val(),
				realname : $("input[name=realname]").val(),
				telphone : $("input[name=telphone]").val()
			}, function(json) {
				if(json)
					alert("添加成功");
				else
					alert("添加失败");
			});
		}
	</script>
</body>
</html>
